﻿<UserControl x:Class="Black.Minecraft.Editor.Views.DataViews.ItemDataView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <Image Grid.Row="0"
               Grid.Column="0"
               Width="28"
               Height="28"
               HorizontalAlignment="Center"
               VerticalAlignment="Center"
               Source="{Binding Image}" />
        <TextBlock Grid.Row="0"
                   Grid.Column="1"
                   Margin="5,2,5,2"
                   FontSize="14"
                   FontWeight="Bold"
                   Foreground="Black"
                   Text="{Binding Name}" />

        <StackPanel Grid.Row="1"
                    Grid.Column="1"
                    Margin="5,-4,5,2"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Top"
                    Orientation="Horizontal">
            <TextBlock FontSize="11"
                       Foreground="Black"
                       Text="{Binding EquipmentType}" />
            <TextBlock Margin="2,0,0,0"
                       FontSize="11"
                       Foreground="Black"
                       Text="(" />
            <TextBlock FontSize="11"
                       Foreground="Black"
                       Text="{Binding MaxStack,
                                      Converter={StaticResource ByteToStringConverter}}" />
            <TextBlock FontSize="11"
                       Foreground="Black"
                       Text=")" />
            <TextBlock FontSize="11"
                       Foreground="Black"
                       Text=", Enchant"
                       Visibility="{Binding CanEnchant,
                                            Converter={StaticResource BoolToVisibilityConverter}}" />
            <TextBlock FontSize="11"
                       Foreground="Black"
                       Text=", Repair"
                       Visibility="{Binding CanRepair,
                                            Converter={StaticResource BoolToVisibilityConverter}}" />
        </StackPanel>

    </Grid>

</UserControl>
